package com.demo.designmode.factory.method;

/**
 * @Author: jxm
 * @Description: 建立芝加哥的披萨店
 * @Date: 2021/7/6 16:07
 * @Version: 1.0
 */
public class ChicagoPizzaStore extends PizzaStore {

    @Override
    Pizza createPizza(String type) {
        Pizza pizza = null;
        if ("cheese".equals(type)) {
            pizza = new ChicagoStyleCheesePizza();
        } else if ("clam".equals(type)) {
            pizza = new ChicagoStyleClamPizza();
        } else if ("pepperoni".equals(type)) {
            pizza = new ChicagoStylePepperoniPizza();
        }
        return pizza;
    }
}
